<?php

abstract class Model {

    private static $ArInstance = array();

    public static function getInstance() {
        $Class = get_called_class();
        if( empty(self::$ArInstance[$Class]) ) {
            self::$ArInstance[$Class] = new $Class();
            self::$ArInstance[$Class]->injectDependencies();
        }
        return self::$ArInstance[$Class];
    }

    public abstract function injectDependencies();

}
?>
